package pl.s7n.paint.commands;

import java.awt.Graphics2D;
import java.awt.Point;
import java.awt.Shape;

import pl.s7n.paint.DrawingToolInfo;

public abstract class AbstractStrokeCmd {

  DrawingToolInfo tool;

  Point           start;
  Shape           shape;

  public void draw(Graphics2D g) {
    if (tool != null) {
      g.setColor(tool.getColor());
      g.setStroke(tool.getStroke());
      g.setFont(tool.getFont());
    }
  }

  public DrawingToolInfo getTool() {
    return tool;
  }

  public void setTool(DrawingToolInfo tool) {
    this.tool = tool;
  }

  public Point getStart() {
    return start;
  }

  public void setStart(Point start) {
    this.start = start;
  }

  public Shape getShape() {
    return shape;
  }

  public void setShape(Shape shape) {
    this.shape = shape;
  }
}
